class CourseCompleteInfo {
  String realName;
  String deptName;
  int status;
  DateTime finishTime;

  CourseCompleteInfo({
    this.realName,
    this.deptName,
    this.status,
    this.finishTime,
  });

  factory CourseCompleteInfo.fromJson(Map<String, dynamic> json) {
    return CourseCompleteInfo(
      status: json['status'] ?? 0,
      realName: json['realname'] ?? '无名氏',
      deptName: json['deptName'] ?? '暂无',
      finishTime: json['finishTime'] == null ? null : DateTime.parse(json['finishTime']),
    );
  }
}
